<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>sort</title>
</head>
<body>
<script>
    var arr1 = ["e", "b", "d", "a", "f", "c"];
    var result = arr1.sort(); // 将数组 arr1 进行排序

    console.log("arr1 =" + JSON.stringify(arr1));
    console.log("result =" + JSON.stringify(result));


    var arr2 = [5, 2, 11, 3, 4, 1];
    var result = arr2s.sort(); // 将数组 arr2 进行排序

    console.log("arr2 =" + JSON.stringify(arr2));
    console.log("result =" + JSON.stringify(result));
</script>
</body>
</html>